﻿using System.Collections.Generic;
using System.Web.Mvc;

using ARCHFORME.Common;

using Sample.Core.Dto;
using Sample.Core.Query;

namespace Sample.Host.Controllers
{
    public class OrderController : Controller
    {
        private readonly IQueryProcessor processor;

        public OrderController(IQueryProcessor processor)
        {
            this.processor = processor;
        }

        public ActionResult Index()
        {
            IEnumerable<OrderDto> dto = processor.Process(new ActiveOrdersQuery());

            return View(dto);
        }
    }
}